//Accepted
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <cmath>
#include <queue>
#include <map>
#include <iostream>
#include <list>
#include <deque>
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int e, l, i, j, t=1,x ,y, n;
bool a[100];

int main (){
	//freopen("in.txt", "r", stdin);//freopen("out.txt", "w", stdout);
	scanf("%d%d", &e, &l);
	while(e&&l){
		memset(a, 1, sizeof(a));
		vector<int> v[100];
		for(i=0;i<l;++i){
			scanf("%d%d", &x, &y);
			--x;--y;
			v[x].push_back(y);
			v[y].push_back(x);
		}
		queue<int> q;
		q.push(0);
		
		while(!q.empty()){
			x=q.front();q.pop();
			n=v[x].size();
			a[x]=0;
			for(i=0;i<n;++i){
				if(a[v[x][i]])q.push(v[x][i]);
			}
		}
		
		for(i=0;i<e;++i)if(a[i])break;
		if(i==e)--i;
		
		printf("Teste %d\n", t++);
		if(a[i])printf("falha\n\n");
		else printf("normal\n\n");
		
		scanf("%d%d", &e, &l);
	}
	return 0;
}
